Integrand size = 34, antiderivative size = 100 \[ \int (a c+b c x)^m (f+g x) \left (a^2+2 a b x+b^2 x^2\right )^p \, dx=\frac {(b f-a g) (a c+b c x)^{1+m} \left (a^2+2 a b x+b^2 x^2\right )^p}{b^2 c (1+m+2 p)}+\frac {g (a c+b c x)^{2+m} \left (a^2+2 a b x+b^2 x^2\right )^p}{b^2 c^2 (2+m+2 p)} \]
(-a*g+b*f)*(b*c*x+a*c)^(1+m)*(b^2*x^2+2*a*b*x+a^2)^p/b^2/c/(1+m+2*p)+g*(b* c*x+a*c)^(2+m)*(b^2*x^2+2*a*b*x+a^2)^p/b^2/c^2/(2+m+2*p)
Time = 0.07 (sec) , antiderivative size = 67, normalized size of antiderivative = 0.67 \[ \int (a c+b c x)^m (f+g x) \left (a^2+2 a b x+b^2 x^2\right )^p \, dx=\frac {(a+b x) (c (a+b x))^m \left ((a+b x)^2\right )^p (-a g+b f (2+m+2 p)+b g (1+m+2 p) x)}{b^2 (1+m+2 p) (2+m+2 p)} \]
((a + b*x)*(c*(a + b*x))^m*((a + b*x)^2)^p*(-(a*g) + b*f*(2 + m + 2*p) + b *g*(1 + m + 2*p)*x))/(b^2*(1 + m + 2*p)*(2 + m + 2*p))
Time = 0.26 (sec) , antiderivative size = 101, normalized size of antiderivative = 1.01, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {1187, 37, 53, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int (f+g x) \left (a^2+2 a b x+b^2 x^2\right )^p (a c+b c x)^m \, dx\) |
\(\Big \downarrow \) 1187 |
\(\displaystyle \left (a b+b^2 x\right )^{-2 p} \left (a^2+2 a b x+b^2 x^2\right )^p \int \left (x b^2+a b\right )^{2 p} (a c+b x c)^m (f+g x)dx\) |
\(\Big \downarrow \) 37 |
\(\displaystyle \left (a^2+2 a b x+b^2 x^2\right )^p (a c+b c x)^{-2 p} \int (a c+b x c)^{m+2 p} (f+g x)dx\) |
\(\Big \downarrow \) 53 |
\(\displaystyle \left (a^2+2 a b x+b^2 x^2\right )^p (a c+b c x)^{-2 p} \int \left (\frac {(b f-a g) (a c+b x c)^{m+2 p}}{b}+\frac {g (a c+b x c)^{m+2 p+1}}{b c}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \left (a^2+2 a b x+b^2 x^2\right )^p (a c+b c x)^{-2 p} \left (\frac {g (a c+b c x)^{m+2 p+2}}{b^2 c^2 (m+2 p+2)}+\frac {(b f-a g) (a c+b c x)^{m+2 p+1}}{b^2 c (m+2 p+1)}\right )\) |
((a^2 + 2*a*b*x + b^2*x^2)^p*(((b*f - a*g)*(a*c + b*c*x)^(1 + m + 2*p))/(b ^2*c*(1 + m + 2*p)) + (g*(a*c + b*c*x)^(2 + m + 2*p))/(b^2*c^2*(2 + m + 2* p))))/(a*c + b*c*x)^(2*p)
3.22.67.3.1 Defintions of rubi rules used
Int[(u_.)*((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> S imp[(a + b*x)^m/(c + d*x)^m Int[u*(c + d*x)^(m + n), x], x] /; FreeQ[{a, b, c, d, m, n}, x] && EqQ[b*c - a*d, 0] && !SimplerQ[a + b*x, c + d*x]
Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int [ExpandIntegrand[(a + b*x)^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0] && LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])
Int[((d_.) + (e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))^(n_.)*((a_) + (b_.)*(x_ ) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(a + b*x + c*x^2)^FracPart[p]/(c^ IntPart[p]*(b/2 + c*x)^(2*FracPart[p])) Int[(d + e*x)^m*(f + g*x)^n*(b/2 + c*x)^(2*p), x], x] /; FreeQ[{a, b, c, d, e, f, g, m, n, p}, x] && EqQ[b^2 - 4*a*c, 0] && !IntegerQ[p]
Time = 0.42 (sec) , antiderivative size = 96, normalized size of antiderivative = 0.96
method | result | size |
gosper | \(-\frac {\left (b^{2} x^{2}+2 a b x +a^{2}\right )^{p} \left (b c x +a c \right )^{m} \left (-b g m x -2 b g p x -b f m -2 b f p -b g x +a g -2 b f \right ) \left (b x +a \right )}{b^{2} \left (m^{2}+4 m p +4 p^{2}+3 m +6 p +2\right )}\) | \(96\) |
risch | \(-\frac {c^{m} \left (b x +a \right )^{m} \left (b x +a \right )^{2 p} \left (-b^{2} g m \,x^{2}-2 b^{2} g p \,x^{2}-a b g m x -2 a b g p x -b^{2} f m x -2 b^{2} f p x -b^{2} g \,x^{2}-a b f m -2 a b f p -2 b^{2} f x +a^{2} g -2 a b f \right ) {\mathrm e}^{-\frac {i \pi \left (\operatorname {csgn}\left (i c \left (b x +a \right )\right )^{3} m -\operatorname {csgn}\left (i c \left (b x +a \right )\right )^{2} \operatorname {csgn}\left (i c \right ) m -\operatorname {csgn}\left (i \left (b x +a \right )\right ) \operatorname {csgn}\left (i c \left (b x +a \right )\right )^{2} m +\operatorname {csgn}\left (i \left (b x +a \right )\right ) \operatorname {csgn}\left (i c \left (b x +a \right )\right ) \operatorname {csgn}\left (i c \right ) m +\operatorname {csgn}\left (i \left (b x +a \right )^{2}\right )^{3} p -2 \operatorname {csgn}\left (i \left (b x +a \right )^{2}\right )^{2} \operatorname {csgn}\left (i \left (b x +a \right )\right ) p +\operatorname {csgn}\left (i \left (b x +a \right )^{2}\right ) \operatorname {csgn}\left (i \left (b x +a \right )\right )^{2} p \right )}{2}}}{\left (1+m +2 p \right ) \left (2+m +2 p \right ) b^{2}}\) | \(284\) |
parallelrisch | \(\frac {x^{2} \left (c \left (b x +a \right )\right )^{m} \left (b^{2} x^{2}+2 a b x +a^{2}\right )^{p} b^{2} g m +2 x^{2} \left (c \left (b x +a \right )\right )^{m} \left (b^{2} x^{2}+2 a b x +a^{2}\right )^{p} b^{2} g p +x^{2} \left (c \left (b x +a \right )\right )^{m} \left (b^{2} x^{2}+2 a b x +a^{2}\right )^{p} b^{2} g +x \left (c \left (b x +a \right )\right )^{m} \left (b^{2} x^{2}+2 a b x +a^{2}\right )^{p} a b g m +2 x \left (c \left (b x +a \right )\right )^{m} \left (b^{2} x^{2}+2 a b x +a^{2}\right )^{p} a b g p +x \left (c \left (b x +a \right )\right )^{m} \left (b^{2} x^{2}+2 a b x +a^{2}\right )^{p} b^{2} f m +2 x \left (c \left (b x +a \right )\right )^{m} \left (b^{2} x^{2}+2 a b x +a^{2}\right )^{p} b^{2} f p +2 x \left (c \left (b x +a \right )\right )^{m} \left (b^{2} x^{2}+2 a b x +a^{2}\right )^{p} b^{2} f +\left (c \left (b x +a \right )\right )^{m} \left (b^{2} x^{2}+2 a b x +a^{2}\right )^{p} a b f m +2 \left (c \left (b x +a \right )\right )^{m} \left (b^{2} x^{2}+2 a b x +a^{2}\right )^{p} a b f p -\left (c \left (b x +a \right )\right )^{m} \left (b^{2} x^{2}+2 a b x +a^{2}\right )^{p} a^{2} g +2 \left (c \left (b x +a \right )\right )^{m} \left (b^{2} x^{2}+2 a b x +a^{2}\right )^{p} a b f}{b^{2} \left (m^{2}+4 m p +4 p^{2}+3 m +6 p +2\right )}\) | \(436\) |
-(b^2*x^2+2*a*b*x+a^2)^p*(b*c*x+a*c)^m*(-b*g*m*x-2*b*g*p*x-b*f*m-2*b*f*p-b *g*x+a*g-2*b*f)*(b*x+a)/b^2/(m^2+4*m*p+4*p^2+3*m+6*p+2)
Time = 0.38 (sec) , antiderivative size = 155, normalized size of antiderivative = 1.55 \[ \int (a c+b c x)^m (f+g x) \left (a^2+2 a b x+b^2 x^2\right )^p \, dx=\frac {{\left (a b f m + 2 \, a b f p + 2 \, a b f - a^{2} g + {\left (b^{2} g m + 2 \, b^{2} g p + b^{2} g\right )} x^{2} + {\left (2 \, b^{2} f + {\left (b^{2} f + a b g\right )} m + 2 \, {\left (b^{2} f + a b g\right )} p\right )} x\right )} {\left (b c x + a c\right )}^{m} e^{\left (2 \, p \log \left (b c x + a c\right ) + p \log \left (\frac {1}{c^{2}}\right )\right )}}{b^{2} m^{2} + 4 \, b^{2} p^{2} + 3 \, b^{2} m + 2 \, b^{2} + 2 \, {\left (2 \, b^{2} m + 3 \, b^{2}\right )} p} \]
(a*b*f*m + 2*a*b*f*p + 2*a*b*f - a^2*g + (b^2*g*m + 2*b^2*g*p + b^2*g)*x^2 + (2*b^2*f + (b^2*f + a*b*g)*m + 2*(b^2*f + a*b*g)*p)*x)*(b*c*x + a*c)^m* e^(2*p*log(b*c*x + a*c) + p*log(c^(-2)))/(b^2*m^2 + 4*b^2*p^2 + 3*b^2*m + 2*b^2 + 2*(2*b^2*m + 3*b^2)*p)
\[ \int (a c+b c x)^m (f+g x) \left (a^2+2 a b x+b^2 x^2\right )^p \, dx=\begin {cases} \left (a c\right )^{m} \left (f x + \frac {g x^{2}}{2}\right ) \left (a^{2}\right )^{p} & \text {for}\: b = 0 \\\int \left (c \left (a + b x\right )\right )^{- 2 p - 2} \left (f + g x\right ) \left (\left (a + b x\right )^{2}\right )^{p}\, dx & \text {for}\: m = - 2 p - 2 \\\int \left (c \left (a + b x\right )\right )^{- 2 p - 1} \left (f + g x\right ) \left (\left (a + b x\right )^{2}\right )^{p}\, dx & \text {for}\: m = - 2 p - 1 \\- \frac {a^{2} g \left (a c + b c x\right )^{m} \left (a^{2} + 2 a b x + b^{2} x^{2}\right )^{p}}{b^{2} m^{2} + 4 b^{2} m p + 3 b^{2} m + 4 b^{2} p^{2} + 6 b^{2} p + 2 b^{2}} + \frac {a b f m \left (a c + b c x\right )^{m} \left (a^{2} + 2 a b x + b^{2} x^{2}\right )^{p}}{b^{2} m^{2} + 4 b^{2} m p + 3 b^{2} m + 4 b^{2} p^{2} + 6 b^{2} p + 2 b^{2}} + \frac {2 a b f p \left (a c + b c x\right )^{m} \left (a^{2} + 2 a b x + b^{2} x^{2}\right )^{p}}{b^{2} m^{2} + 4 b^{2} m p + 3 b^{2} m + 4 b^{2} p^{2} + 6 b^{2} p + 2 b^{2}} + \frac {2 a b f \left (a c + b c x\right )^{m} \left (a^{2} + 2 a b x + b^{2} x^{2}\right )^{p}}{b^{2} m^{2} + 4 b^{2} m p + 3 b^{2} m + 4 b^{2} p^{2} + 6 b^{2} p + 2 b^{2}} + \frac {a b g m x \left (a c + b c x\right )^{m} \left (a^{2} + 2 a b x + b^{2} x^{2}\right )^{p}}{b^{2} m^{2} + 4 b^{2} m p + 3 b^{2} m + 4 b^{2} p^{2} + 6 b^{2} p + 2 b^{2}} + \frac {2 a b g p x \left (a c + b c x\right )^{m} \left (a^{2} + 2 a b x + b^{2} x^{2}\right )^{p}}{b^{2} m^{2} + 4 b^{2} m p + 3 b^{2} m + 4 b^{2} p^{2} + 6 b^{2} p + 2 b^{2}} + \frac {b^{2} f m x \left (a c + b c x\right )^{m} \left (a^{2} + 2 a b x + b^{2} x^{2}\right )^{p}}{b^{2} m^{2} + 4 b^{2} m p + 3 b^{2} m + 4 b^{2} p^{2} + 6 b^{2} p + 2 b^{2}} + \frac {2 b^{2} f p x \left (a c + b c x\right )^{m} \left (a^{2} + 2 a b x + b^{2} x^{2}\right )^{p}}{b^{2} m^{2} + 4 b^{2} m p + 3 b^{2} m + 4 b^{2} p^{2} + 6 b^{2} p + 2 b^{2}} + \frac {2 b^{2} f x \left (a c + b c x\right )^{m} \left (a^{2} + 2 a b x + b^{2} x^{2}\right )^{p}}{b^{2} m^{2} + 4 b^{2} m p + 3 b^{2} m + 4 b^{2} p^{2} + 6 b^{2} p + 2 b^{2}} + \frac {b^{2} g m x^{2} \left (a c + b c x\right )^{m} \left (a^{2} + 2 a b x + b^{2} x^{2}\right )^{p}}{b^{2} m^{2} + 4 b^{2} m p + 3 b^{2} m + 4 b^{2} p^{2} + 6 b^{2} p + 2 b^{2}} + \frac {2 b^{2} g p x^{2} \left (a c + b c x\right )^{m} \left (a^{2} + 2 a b x + b^{2} x^{2}\right )^{p}}{b^{2} m^{2} + 4 b^{2} m p + 3 b^{2} m + 4 b^{2} p^{2} + 6 b^{2} p + 2 b^{2}} + \frac {b^{2} g x^{2} \left (a c + b c x\right )^{m} \left (a^{2} + 2 a b x + b^{2} x^{2}\right )^{p}}{b^{2} m^{2} + 4 b^{2} m p + 3 b^{2} m + 4 b^{2} p^{2} + 6 b^{2} p + 2 b^{2}} & \text {otherwise} \end {cases} \]
Piecewise(((a*c)**m*(f*x + g*x**2/2)*(a**2)**p, Eq(b, 0)), (Integral((c*(a + b*x))**(-2*p - 2)*(f + g*x)*((a + b*x)**2)**p, x), Eq(m, -2*p - 2)), (I ntegral((c*(a + b*x))**(-2*p - 1)*(f + g*x)*((a + b*x)**2)**p, x), Eq(m, - 2*p - 1)), (-a**2*g*(a*c + b*c*x)**m*(a**2 + 2*a*b*x + b**2*x**2)**p/(b**2 *m**2 + 4*b**2*m*p + 3*b**2*m + 4*b**2*p**2 + 6*b**2*p + 2*b**2) + a*b*f*m *(a*c + b*c*x)**m*(a**2 + 2*a*b*x + b**2*x**2)**p/(b**2*m**2 + 4*b**2*m*p + 3*b**2*m + 4*b**2*p**2 + 6*b**2*p + 2*b**2) + 2*a*b*f*p*(a*c + b*c*x)**m *(a**2 + 2*a*b*x + b**2*x**2)**p/(b**2*m**2 + 4*b**2*m*p + 3*b**2*m + 4*b* *2*p**2 + 6*b**2*p + 2*b**2) + 2*a*b*f*(a*c + b*c*x)**m*(a**2 + 2*a*b*x + b**2*x**2)**p/(b**2*m**2 + 4*b**2*m*p + 3*b**2*m + 4*b**2*p**2 + 6*b**2*p + 2*b**2) + a*b*g*m*x*(a*c + b*c*x)**m*(a**2 + 2*a*b*x + b**2*x**2)**p/(b* *2*m**2 + 4*b**2*m*p + 3*b**2*m + 4*b**2*p**2 + 6*b**2*p + 2*b**2) + 2*a*b *g*p*x*(a*c + b*c*x)**m*(a**2 + 2*a*b*x + b**2*x**2)**p/(b**2*m**2 + 4*b** 2*m*p + 3*b**2*m + 4*b**2*p**2 + 6*b**2*p + 2*b**2) + b**2*f*m*x*(a*c + b* c*x)**m*(a**2 + 2*a*b*x + b**2*x**2)**p/(b**2*m**2 + 4*b**2*m*p + 3*b**2*m + 4*b**2*p**2 + 6*b**2*p + 2*b**2) + 2*b**2*f*p*x*(a*c + b*c*x)**m*(a**2 + 2*a*b*x + b**2*x**2)**p/(b**2*m**2 + 4*b**2*m*p + 3*b**2*m + 4*b**2*p**2 + 6*b**2*p + 2*b**2) + 2*b**2*f*x*(a*c + b*c*x)**m*(a**2 + 2*a*b*x + b**2 *x**2)**p/(b**2*m**2 + 4*b**2*m*p + 3*b**2*m + 4*b**2*p**2 + 6*b**2*p + 2* b**2) + b**2*g*m*x**2*(a*c + b*c*x)**m*(a**2 + 2*a*b*x + b**2*x**2)**p/...
Time = 0.21 (sec) , antiderivative size = 128, normalized size of antiderivative = 1.28 \[ \int (a c+b c x)^m (f+g x) \left (a^2+2 a b x+b^2 x^2\right )^p \, dx=\frac {{\left (b c^{m} x + a c^{m}\right )} f e^{\left (m \log \left (b x + a\right ) + 2 \, p \log \left (b x + a\right )\right )}}{b {\left (m + 2 \, p + 1\right )}} + \frac {{\left (b^{2} c^{m} {\left (m + 2 \, p + 1\right )} x^{2} + a b c^{m} {\left (m + 2 \, p\right )} x - a^{2} c^{m}\right )} g e^{\left (m \log \left (b x + a\right ) + 2 \, p \log \left (b x + a\right )\right )}}{{\left (m^{2} + m {\left (4 \, p + 3\right )} + 4 \, p^{2} + 6 \, p + 2\right )} b^{2}} \]
(b*c^m*x + a*c^m)*f*e^(m*log(b*x + a) + 2*p*log(b*x + a))/(b*(m + 2*p + 1) ) + (b^2*c^m*(m + 2*p + 1)*x^2 + a*b*c^m*(m + 2*p)*x - a^2*c^m)*g*e^(m*log (b*x + a) + 2*p*log(b*x + a))/((m^2 + m*(4*p + 3) + 4*p^2 + 6*p + 2)*b^2)
Leaf count of result is larger than twice the leaf count of optimal. 404 vs. \(2 (100) = 200\).
Time = 0.27 (sec) , antiderivative size = 404, normalized size of antiderivative = 4.04 \[ \int (a c+b c x)^m (f+g x) \left (a^2+2 a b x+b^2 x^2\right )^p \, dx=\frac {{\left (b x + a\right )}^{2 \, p} b^{2} g m x^{2} e^{\left (m \log \left (b x + a\right ) + m \log \left (c\right )\right )} + 2 \, {\left (b x + a\right )}^{2 \, p} b^{2} g p x^{2} e^{\left (m \log \left (b x + a\right ) + m \log \left (c\right )\right )} + {\left (b x + a\right )}^{2 \, p} b^{2} f m x e^{\left (m \log \left (b x + a\right ) + m \log \left (c\right )\right )} + {\left (b x + a\right )}^{2 \, p} a b g m x e^{\left (m \log \left (b x + a\right ) + m \log \left (c\right )\right )} + 2 \, {\left (b x + a\right )}^{2 \, p} b^{2} f p x e^{\left (m \log \left (b x + a\right ) + m \log \left (c\right )\right )} + 2 \, {\left (b x + a\right )}^{2 \, p} a b g p x e^{\left (m \log \left (b x + a\right ) + m \log \left (c\right )\right )} + {\left (b x + a\right )}^{2 \, p} b^{2} g x^{2} e^{\left (m \log \left (b x + a\right ) + m \log \left (c\right )\right )} + {\left (b x + a\right )}^{2 \, p} a b f m e^{\left (m \log \left (b x + a\right ) + m \log \left (c\right )\right )} + 2 \, {\left (b x + a\right )}^{2 \, p} a b f p e^{\left (m \log \left (b x + a\right ) + m \log \left (c\right )\right )} + 2 \, {\left (b x + a\right )}^{2 \, p} b^{2} f x e^{\left (m \log \left (b x + a\right ) + m \log \left (c\right )\right )} + 2 \, {\left (b x + a\right )}^{2 \, p} a b f e^{\left (m \log \left (b x + a\right ) + m \log \left (c\right )\right )} - {\left (b x + a\right )}^{2 \, p} a^{2} g e^{\left (m \log \left (b x + a\right ) + m \log \left (c\right )\right )}}{b^{2} m^{2} + 4 \, b^{2} m p + 4 \, b^{2} p^{2} + 3 \, b^{2} m + 6 \, b^{2} p + 2 \, b^{2}} \]
((b*x + a)^(2*p)*b^2*g*m*x^2*e^(m*log(b*x + a) + m*log(c)) + 2*(b*x + a)^( 2*p)*b^2*g*p*x^2*e^(m*log(b*x + a) + m*log(c)) + (b*x + a)^(2*p)*b^2*f*m*x *e^(m*log(b*x + a) + m*log(c)) + (b*x + a)^(2*p)*a*b*g*m*x*e^(m*log(b*x + a) + m*log(c)) + 2*(b*x + a)^(2*p)*b^2*f*p*x*e^(m*log(b*x + a) + m*log(c)) + 2*(b*x + a)^(2*p)*a*b*g*p*x*e^(m*log(b*x + a) + m*log(c)) + (b*x + a)^( 2*p)*b^2*g*x^2*e^(m*log(b*x + a) + m*log(c)) + (b*x + a)^(2*p)*a*b*f*m*e^( m*log(b*x + a) + m*log(c)) + 2*(b*x + a)^(2*p)*a*b*f*p*e^(m*log(b*x + a) + m*log(c)) + 2*(b*x + a)^(2*p)*b^2*f*x*e^(m*log(b*x + a) + m*log(c)) + 2*( b*x + a)^(2*p)*a*b*f*e^(m*log(b*x + a) + m*log(c)) - (b*x + a)^(2*p)*a^2*g *e^(m*log(b*x + a) + m*log(c)))/(b^2*m^2 + 4*b^2*m*p + 4*b^2*p^2 + 3*b^2*m + 6*b^2*p + 2*b^2)
Time = 11.20 (sec) , antiderivative size = 178, normalized size of antiderivative = 1.78 \[ \int (a c+b c x)^m (f+g x) \left (a^2+2 a b x+b^2 x^2\right )^p \, dx={\left (a^2+2\,a\,b\,x+b^2\,x^2\right )}^p\,\left (\frac {g\,x^2\,{\left (a\,c+b\,c\,x\right )}^m\,\left (m+2\,p+1\right )}{m^2+4\,m\,p+3\,m+4\,p^2+6\,p+2}+\frac {a\,{\left (a\,c+b\,c\,x\right )}^m\,\left (2\,b\,f-a\,g+b\,f\,m+2\,b\,f\,p\right )}{b^2\,\left (m^2+4\,m\,p+3\,m+4\,p^2+6\,p+2\right )}+\frac {x\,{\left (a\,c+b\,c\,x\right )}^m\,\left (2\,b\,f+a\,g\,m+b\,f\,m+2\,a\,g\,p+2\,b\,f\,p\right )}{b\,\left (m^2+4\,m\,p+3\,m+4\,p^2+6\,p+2\right )}\right ) \]
(a^2 + b^2*x^2 + 2*a*b*x)^p*((g*x^2*(a*c + b*c*x)^m*(m + 2*p + 1))/(3*m + 6*p + 4*m*p + m^2 + 4*p^2 + 2) + (a*(a*c + b*c*x)^m*(2*b*f - a*g + b*f*m + 2*b*f*p))/(b^2*(3*m + 6*p + 4*m*p + m^2 + 4*p^2 + 2)) + (x*(a*c + b*c*x)^ m*(2*b*f + a*g*m + b*f*m + 2*a*g*p + 2*b*f*p))/(b*(3*m + 6*p + 4*m*p + m^2 + 4*p^2 + 2)))